package study.week05.bytebuddy.agent;

import study.week05.bytebuddy.agent.target.AgentObject;

public class AgentTest {
    public static void main(String[] args) throws Exception {
        //首先指定Premain类
        //修改resources目录下 META-INF\MANIFEST.MF的内容:
        //Premain-Class: study.week05.bytebuddy.agent.MyAgent
        //然后把项目打jar包 mvn package
        //然后增加vm参数: -javaagent:./target/week5-agent.jar
        AgentObject test = new AgentObject();
        test.method1();
        test.method2();

    }
}
